package com.huiyeji.dynamic.core.bean;



import com.huiyeji.dynamic.core.annotations.DynamicBean;
import com.huiyeji.dynamic.core.annotations.DynamicMethod;

import java.util.HashMap;
import java.util.Map;

@DynamicBean("map")
public class DynamicMap {

    @DynamicMethod
    public Map<String, Object> create(){
        return new HashMap<String, Object>();
    }

    @DynamicMethod
    public void put(Map<String,Object> map,String key, Object value){
        map.put(key,value);
    }

    @DynamicMethod
    public Object get(Map<String,Object> map,String key){
        return map.get(key);
    }
}
